package cloud.coder.remote.test;

import cloud.coder.remote.boot.HandlerManager;
import cloud.coder.remote.grpc.server.handler.HelloServiceHandler;
import cloud.coder.remote.grpc.server.handler.ManagementServiceHandler;
import cloud.coder.remote.grpc.server.handler.MsgReportServiceHandler;
import cloud.coder.remote.grpc.server.ServiceServer;

public class ServerMain {
    public static void main(String[] args) throws Exception {
        ServiceServer server = new ServiceServer("localhost",7077);
        server.init();

        //通过SPI添加grpc handler
        HandlerManager.INSTANCE.registerHandlers(server);

        server.startServer();

        server.blockUntilShutdown();
    }
}
